package 实现类.作业;

import java.util.Calendar;
import java.util.Scanner;

public class zuoye9 {
    public static void main(String[] args) {
        Scanner inout=new Scanner(System.in);
        System.out.println("请输入年份");
        int year=inout.nextInt();
        System.out.println("请输入月份");
        int monrh=inout.nextInt();
        System.out.println("请输入日期");
        int day=inout.nextInt();
        Calendar cal=Calendar.getInstance();
        cal.set(year,monrh-1,day);
        long dateMilll=cal.getTimeInMillis();
        System.out.println("请输入年份");
        int year1=inout.nextInt();
        System.out.println("请输入月份");
        int monrh1=inout.nextInt();
        System.out.println("请输入日期");
        int day1=inout.nextInt();
        cal.set(year1,monrh1-1,day1);
        long dateMill2=cal.getTimeInMillis();
        long tian=Math.abs(dateMill2-dateMilll)/1000/60/60/24;
        System.out.println("相差"+tian+"天");

    }
}
